package com.core.request.bo;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.core.request.dao.VisaRequestDAO;
import com.core.request.pojo.VisaCancelDto;
import com.core.request.pojo.VisaResponse;
import com.core.request.pojo.VisaAddUpdateDtoSql;

@Service
public class VisaRequestBo {
	@Resource
	private VisaRequestDAO visaRequestDAO;

	public VisaAddUpdateDtoSql getVisaForAddUpdate() {
		VisaAddUpdateDtoSql visa = visaRequestDAO.getVisaForAddUpdate();
		return visa;
	}

	public VisaCancelDto getVisaForCancel() {
		VisaCancelDto dto = visaRequestDAO.getVisaForCancel();
		return dto;
	}

	public int updateVisaState(VisaResponse visaResponse) {
		visaResponse.setSubmitDate(new Date());
		return visaRequestDAO.updateVisaState(visaResponse);
	}
}
